package fwk.impl;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import fwk.Controller;
import fwk.HandlerAdapter;

public class SimpleControllerHandlerAdapter implements HandlerAdapter {

	@Override
	public ModelAndView processController(Controller controller,
			HttpServletRequest request, HttpServletResponse resp) {
		if(controller ==null){
			resp.setStatus(404);
			return null;
		}
		else{
			return controller.handleRequest(request, resp);
		}
	}

}
